]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
perf: fix bug in code to print out metrics
authorOwen W. Taylor <otaylor@fishsoup.net>
Mon, 19 May 2014 23:26:41 +0000 (19:26 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Sun, 29 Jun 2014 22:27:54 +0000 (18:27 -0400)
We don't normally hit the code in scripting.js to print metrics
because shell-perf-tool bypasses it, but there was a left-over
in the code that no longer works. Also add in the units to the
output.

https://bugzilla.gnome.org/show_bug.cgi?id=732349

js/ui/scripting.js

index 72f670261fcd3a952afa97785504a0ebb8b7c82f..f952ed07b12174bbeac02f88633926aadc874442 100644 (file)
@@ -306,8 +306,8 @@ function _collect(scriptModule, outputFile) {
         print ('------------------------------------------------------------');
         for (let i = 0; i < metrics.length; i++) {
             let metric = metrics[i];
-            print ('# ' + scriptModule.METRIC_DESCRIPTIONS[metric]);
-            print (metric + ': ' +  scriptModule.METRICS[metric]);
+            print ('# ' + scriptModule.METRICS[metric].description);
+            print (metric + ': ' +  scriptModule.METRICS[metric].value + scriptModule.METRICS[metric].units);
         }
         print ('------------------------------------------------------------');
     }